package com.avic.modules.log.service;

import com.avic.common.service.BaseService;
import com.avic.modules.log.domain.Log;
import com.avic.modules.log.domain.vo.LogVo;
import com.avic.modules.log.service.dto.LogDto;
import com.avic.modules.log.service.dto.LogQueryCriteria;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface LogsService extends BaseService<Log> {

    /**
     * 查询数据分页
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    Map<String, Object> queryAll(LogQueryCriteria criteria, Pageable pageable);


    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<Log>
     */
    List<Log> queryAll(LogQueryCriteria criteria);

    List<Log> queryAlls(LogQueryCriteria criteria, Pageable pageable);

    void save(LogVo logVo);

    void sysAdminSave(LogVo logVo);

    /**
     * 导出操作日志信息
     * @param all
     * @param response
     */
    void download(List<LogDto> all, HttpServletResponse response) throws IOException;

    /**
     * 查询用户日志
     * @param criteria 查询条件
     * @param pageable 分页参数
     * @return -
     */
    Object queryAllByUser(LogQueryCriteria criteria, Pageable pageable);
}
